// import './App.css';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import Login from './pages/Login';
import Layout from './pages/Layout';
import Home from './pages/Home';
import Article from './pages/Article';
import Publish from './pages/Publish';
import { AuthComponent } from './components/AuthComponent';

import './App.css';
function App() {
  return (
    // 路由配置
    <BrowserRouter>
      <div className="App">
        {/* <Button type="primary">Button</Button> */}
        <Routes>
          <Route
            path="/"
            element={
              <AuthComponent>
                <Layout />
              </AuthComponent>
            }
          >
            <Route index element={<Home />}></Route>
            <Route path="article" element={<Article />}></Route>
            <Route path="publish" element={<Publish />}></Route>
          </Route>
          <Route path="/login" element={<Login />}></Route>
        </Routes>
      </div>
      ;
    </BrowserRouter>
  );
}

export default App;
